package com.ophiux.pay.controller.notify;

import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @desc:
 * @author: hhl
 * @date：2023/3/23 16:53
 */
@Data
public class PayResult {

    @ApiModelProperty("通知的唯一ID")
    private String id;

    @JSONField(name = "create_time")
    @ApiModelProperty("通知创建的时间 2015-05-20T13:29:35+08:00")
    private LocalDateTime createTime;

    @JSONField(name = "resource_type")
    @ApiModelProperty("通知类型：支付成功通知的类型为TRANSACTION.SUCCESS")
    private String resourceType;

    @ApiModelProperty("通知数据类型")
    @JSONField(name = "event_type")
    private String eventType;

    @ApiModelProperty("通知数据")
    private Resource resource;

    @ApiModelProperty("回调摘要")
    private String summary;


    @Data
    public class Resource{
        @JSONField(name = "original_type")
        @ApiModelProperty("原始类型")
        private String originalType;

        @ApiModelProperty("加密算法类型")
        private String algorithm;

        @ApiModelProperty("原始类型")
        private String ciphertext;

        @JSONField(name = "associated_data")
        @ApiModelProperty("附加数据")
        private String associatedData;

        @ApiModelProperty("加密使用的随机串")
        private String nonce;
    }
}
